package Druid;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = AppConfig.class)
public class DruidTest {
    
    @Autowired
    private DataSource dataSource;
    
    @Test
    public void testDruidConnection() throws SQLException {
        assertNotNull(dataSource);
        Connection connection = dataSource.getConnection();
        assertNotNull(connection);
        System.out.println("数据源连接成功: " + connection);
        connection.close();
    }
}